{% extends "base.html" %}

{% block content %}
<h2>Terminy praktyk</h2>
{% for spec in specializations %}
<table>
    <thead>
    <tr><th>Kierunek</th><th colspan=3>{{ spec }}</th></tr>
    <tr>
        <th>Początek</th>
        <th>Koniec</th>
        <th></th>
        <th></th>
    </tr>
    </thead>
    {% for training_date in spec.training_date_set.all %}
    <tr>
        <td>{{ training_date.start_date }}</td>
        <td>{{ training_date.end_date }}</td>
        <td><a href="/dates/edit/{{ training_date.id }}/">Edytuj</a></td>
        <td><a href="/dates/delete/{{ training_date.id }}/">Usuń</a></td>
    </tr>
    {% endfor %}
    <thead><tr><th colspan=4><a href="/dates/new/{{ spec.id }}/">Nowy termin</a></th></tr></thead>
</table>
<a href="/dates/generate/">Generuj terminy praktyk</a>
{% endfor %}
{% endblock %}

